
{extend name="base" /}
{block name="css"}
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/info.css?v={$version|default=100}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/css/common.css?v={$version|default=100}">
<link rel="stylesheet" href="https://paidou.cdn.dgyunju.cn/fonts/iconfont.css"/>
<style>
    .tab a{
        color: black;
    }
    .is-active a{
        color: white;
    }
</style>
{/block}
{block name="content"}
<div id="container">
    <div id="header"></div>
    <div id="rightside"></div>
    <div class="banner">
        <img class="image" src="https://paidou.cdn.dgyunju.cn/image/company.png" alt="">
        <div class="img-word">
            <h1 class="word-title">{:lang('consult')}</h1>
            <p class="word-en">CORPORATE NEWS</p>
            <p class="word-content">{$config['page_info_tip']|default=''}</p>
        </div>
    </div>
    <div id="content">
        <div class="download">
            <h2 class="top">
                {:lang('consult')}
            </h2>
            <div class="long-line">
            </div>
            <div class="show-tabs">
                <div class="tabs" id="tabs">
                    {foreach category as $c}
                    <div class="tab {if  $c['is-active']}is-active{/if}" data-id="{$c['id']}">
                        <a href="__DOMAIN__/info.html?type={$c['id']}">{$c['name']}</a></div>
                    {/foreach}
                </div>
                <div class="tab-contents">
                    <div id="tab1" class="tab-content active">
                        {if $news['total'] > 0}
                        {foreach $news['data'] as $n}
                        <a href="__DOMAIN__/news/{$n['id']}.html" class="tab-list">
                            <div class="tab-img">
                                <img class="image" src="{$n['cover']|default=$config['logo']}?imageView2/1/w/200" alt="">
                            </div>
                            <div class="tab-word">
                                <div class="time"><span class="fi fi-clock"></span>{$n['public_time']|default=''}</div>
                                <div class="important">{$n['title']}</div>
                                <div class="tips">{$n['description']}</div>
                                <div class="more">>>></div>
                            </div>
                        </a>
                        {/foreach}
                        {else}
                        <div class="no-data">
                            <img class="no-img" src="https://paidou.cdn.dgyunju.cn/image/nodata.png" alt="">
					        <p>{:lang('no_data')}~</p> 
                        </div>
                        {/if}
                    </div>

                </div>
                <div id="pagination" class="l-page"></div>
            </div>

        </div>

    </div>
    <div id="footer"></div>
</div>
{/block}
{block name="script"}
<script src="https://paidou.cdn.dgyunju.cn/js/pagination.min.js"></script>
<!-- <script src="https://paidou.cdn.dgyunju.cn/js/common.js"></script> -->
<script>
    $(function () {
        $(".tab-content:first").addClass("active");
        $(".tab").click(function() {
            $(".tab-content").removeClass("active");
            $(".tab").removeClass('is-active');
            $(this).addClass('is-active');
            var tabId = $(this).attr("data-tab");
            $("#" + tabId).addClass("active");
        });
        $("#pagination").pagination({
            currentPage:{$news['current_page']|default=1},
            totalPage:{$news['totalPage']|default=1},
            /*是否显示首页、尾页 true：显示 false：不显示*/
            isShow:true,
            /*分页条显示可见页码数量*/
            count:"{$size|default=10}",
            /*第一页显示文字*/
            homePageText:"{:lang('homePageText')}",
            /*最后一页显示文字*/
            endPageText:"{:lang('endPageText')}",
            /*上一页显示文字*/
            prevPageText:"{:lang('prevPageText')}",
            /* 下一页显示文字*/
            nextPageText:"{:lang('nextPageText')}",
            /*点击翻页绑定事件*/
            callback: function(page) {
                window.location.href = "{:url('/info',['type'=>$type])}&page="+page;
            }
        });

    })
    $("#tabs>div").click(function(){
        let type = $(this).attr('data-id');
        window.location.href = "__DOMAIN__/info.html?type="+type;
    });
</script>

{/block}

{/extend}
